import { Component } from '@angular/core';
import { NavController, NavParams, App, ModalController, Events } from 'ionic-angular';
import { CurrencyPage } from './currency/currency';


@Component({
  selector: 'page-setting',
  templateUrl: 'setting.html',
})
export class SettingPage {
  currencyData;
  currency = "本币";
  constructor(
    public navCtrl: NavController,
    public navParams: NavParams,
    public app: App,
    private modalCtrl: ModalController,
    private events: Events,
  ) {

  }
  ionViewDidLoad() {
    console.log('ionViewDidLoad LoginPage');
  }

  currencyChose() {
    this.events.subscribe('user:created', (relationship,time) => {
      this.currency = relationship;
    })
    this.navCtrl.push(CurrencyPage,{
      currency : this.currency
    });
  }
}
